﻿using SD.Libs.Navigation;
using TestRunner.App.ViewModels;
using TestRunner.App.Model;

namespace TestRunner.App
{
    public class ViewModelLocator
    {
        #region services

        NavigationService _navigationService;
        IModel _model;

        #endregion services

        public ViewModelLocator()
        {
            if (System.ComponentModel.DesignerProperties.IsInDesignTool == false)
            {
                _navigationService = new NavigationService();
                _model = new ModelReal();
            }
            else
            {
                _model = new ModelMock();
            }
        }

        public CustomerListVM CustomerListViewModel
        {
            get { return new CustomerListVM(_navigationService, _model); }
        }

        public CustomerDetailVM CustomerDetailViewModel
        {
            get { return new CustomerDetailVM(_navigationService, _model); }
        }
    }
}
